// pages/Login/Cancellation/Cancellation.js
const app = getApp()
const util = require('../../../utils/util.js')
const http = require('../../../utils/http.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    tops: Number(getApp().globalData.statusBarHeight + 46),
    isIPX: app.globalData.isIPX,
    src: 'https://huixuangou.oss-cn-beijing.aliyuncs.com/wechat/Xz_MiNi_image/setting_icon_weigouxuan@2x.png',
    state:1
  },
  ChangeState() {
    if (this.data.src == 'https://huixuangou.oss-cn-beijing.aliyuncs.com/wechat/Xz_MiNi_image/setting_icon_weigouxuan@2x.png') {
      this.setData({
        src: 'https://huixuangou.oss-cn-beijing.aliyuncs.com/wechat/Xz_MiNi_image/setting_icon_yigouxuan@2x.png',
        state:0
      })
    } else {
      this.setData({
        src: 'https://huixuangou.oss-cn-beijing.aliyuncs.com/wechat/Xz_MiNi_image/setting_icon_weigouxuan@2x.png',
        state:1
      })
    }
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
    this.Modal = this.selectComponent("#modal");

  },
  Cash() {
    if(this.data.state == 0){
      this.Modal.showModal()
    }
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})